{% extends 'base.html.twig' %}

{% block body_id 'login' %}

{% block javascripts %}
    {{ parent() }}
    <script src="{{ asset('build/js/login.js') }}"></script>
{% endblock %}

{% block main %}
    {% if error %}
        <div class="alert alert-danger">
            {{ error.messageKey|trans(error.messageData, 'security') }}
        </div>
    {% endif %}

    <div class="row">
    <div id="login-help" class="col-sm-5">
    </div>
        <div class="col-sm-5">
            <div class="well">
                <form action="{{ path('security_login') }}" method="post">
                    <fieldset>
                        <legend><i class="fa fa-lock" aria-hidden="true"></i> {{ 'title.login'|trans }}</legend>
                        <div class="form-group">
                            <label for="username">{{ 'label.username'|trans }}</label>
                            <input type="text" id="username" name="_username" value="" class="form-control"/>
                        </div>
                        <div class="form-group">
                            <label for="password">{{ 'label.password'|trans }}</label>
                            <input type="password" id="password" name="_password" class="form-control" />
                        </div>
                        <input type="hidden" name="_target_path" value="{{ app.request.get('redirect_to') }}"/>
                        <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
                        <button type="submit" class="btn btn-primary">
                            <i class="fa fa-sign-in" aria-hidden="true"></i> {{ 'action.sign_in'|trans }}
                        </button>
                        <a href="{{ path('security_register') }}">
                            <button type="button" class="btn btn-warning">
                                <i class="fa fa-sign-in" aria-hidden="true"></i> {{ 'action.sign_up'|trans }}
                            </button>
                        </a>
                    </fieldset>
                </form>
            </div>
        </div>


    </div>
{% endblock %}

{% block sidebar %}
    {{ parent() }}

{% endblock %}
